//
//  PurchaseViewController.h
//  iShop
//
//  Created by svp on 19/12/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PurchaseProductCell.h"
#import "Shop.h"
#import "Product.h"
#import "WebRequest.h"

@interface PurchaseViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, PurchaseProductCellDelegate,WebRequestDelegate>{
	UITableView *_tableView;
	UIBarButtonItem *_changeModeButton;
	int count;
	CGFloat _keyboardHeight;
	UITableViewCell *_editCell;
	Shop *_shop;
	Product *_product;
	NSArray *subProducts;
	NSMutableArray *subProductPicker;
	NSMutableArray *amountProducts;
	double total;
	
}

@property(nonatomic, retain) IBOutlet UITableView *tableView;
@property(nonatomic, retain) IBOutlet UIBarButtonItem *changeModeButton;
@property(nonatomic, assign) Shop *shop;
@property(nonatomic, assign) Product *product;

-(IBAction) cancelPress:(id) sender;
-(IBAction) savePress:(id) sender;
-(IBAction) changeMode:(id) sender;
-(void) prepareData;

@end
